/**
 * fileName: IndexDAO.java
 *     Date: 2012-4-28
 **/
package com.stranger.index.dao;

import java.sql.SQLException;
import java.util.List;

import com.stranger.common.dao.AbstractBaseDAO;

import com.stranger.index.bean.TeachersBean;

/**
 * @作者 stranger.lin
 *
 * @时间 2012-4-28
 */
public class IndexDAO extends AbstractBaseDAO {

	private final static String NS="com.stranger.index.dao.IndexDAO";
	
	
	public Object insert( Object object) throws SQLException {
		// TODO Auto-generated method stub
		return super.insert(NS+".insertTeacher", object);
	}
	
	
	public void update( Object object) throws SQLException {
		// TODO Auto-generated method stub
		super.update(NS+".updateTeacher", object);
	}
	
	
	public int deleteByPK(String PK) throws SQLException {
		// TODO Auto-generated method stub
		return super.deleteByPK(NS+".deleteTeacherById", PK);
	}
	
	

	@SuppressWarnings("unchecked")
	public List<TeachersBean> findListByAnyWhere( Object object) throws SQLException {
		// TODO Auto-generated method stub
		return (List<TeachersBean>)super.findListByAnyWhere(NS+".findTeacherByAnyWhere", object).getRows();
	}
	
	
	public Object load( String Pk) throws SQLException {
		// TODO Auto-generated method stub
		return super.load(NS+".findTeacherById", Pk);
	}
	
	public Object loadUser(Object object){
		return getSqlMapClientTemplate().queryForObject(NS+".findUserByBean", object);
	}
	
}
